import { defineComponent, onMounted, ref } from 'vue'
import styles from './Test.module.less'
interface Iprops {
  msg: string
}
export default defineComponent({
  props: {
    msg: {
      type: String,
      require: true,
      default: 'hello'
    }
  },
  setup: () => {
    const count = ref('我是ts')
    const h2Ref = ref<HTMLHtmlElement | null>(null)

    onMounted(() => {
      console.log(h2Ref, 'test-h2')
    })
    return (props: Iprops) => (
      <div>
        {count.value}
        <h2 class={styles.h1} ref="h2Ref">{props.msg}</h2>
      </div>
    )
  }
})
